{template 'header'}
<div id="js-goods-post" ng-controller="goodsPostCtrl" ng-cloak>
	<!--编辑模块-->
	<ol class="breadcrumb we7-breadcrumb">
		<a href="{php echo url('store/goods-seller', array('online' => STATUS_OFF))}"><i class="wi wi-back-circle"></i> </a>
		<li>应用列表</li>
		<li>编辑设置</li>
	</ol>
	<form action="" class="we7-form" method="post">
		<div class="form-group">
			<label class="control-label col-sm-2">商品名称</label>
			<div class="col-sm-8">
				<div class="input-group">
					<input type="text" name="title" class="form-control" ng-model="goodsInfo.title" readonly>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2">设置价格</label>
			<div class="col-sm-8">
				<div class="input-group">
					<input type="number" class="form-control" name="price" ng-model="goodsInfo.price" step="0.01">
					<span class="input-group-addon" ng-if="goodsInfo">元/{{goodsInfo.unit}}</span>
					<span class="input-group-addon" ng-if="!goodsInfo">元/月</span>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2">幻灯片</label>
			<div class="col-sm-8">
				<div class="panel we7-panel">
					<div class="panel-body">
						<div class="batch-img">
							<div class="img-container" ng-repeat="slide in slideLists" ng-if="slideLists">
								<input type="hidden" name="slide[]" value="{{slide}}">
								<img ng-src="{{slide}}" >
								<div class="del" ng-click="delSlide($index)">删除</div>
							</div>
							<div class="img-container add" ng-click="addSlide()" ng-if="slideLists.length < 3">
								<span class="wi wi-registersite"></span>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="control-label col-sm-2"></label>
			<div class="col-sm-8">
				<input type="hidden" name="token" value="{$_W['token']}">
				<input type="submit" class="btn btn-primary" name="submit" value="仅保存">
				<input type="submit" class="btn btn-primary" name="submit" value="保存并上架">
			</div>
		</div>
	</form>
</div>
<script>
	angular.module('storeApp').value('config', {
		'goodsInfo': {php echo !empty($goods_info) ? json_encode($goods_info) : 'null'},
	});
	angular.bootstrap($('#js-goods-post'), ['storeApp']);
</script>
{template 'common/footer'}